package com.yuteng.video.config;


import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: zrs
 * @Date: 2020/12/01/17:05
 * @Description: 创建Bean
 */
@Configuration
public class MinioConfig {

    @Value("${minio.url}")
    private String endpoint;
    @Value("${minio.bucketName}")
    private String bucketName;
    @Value("${minio.username}")
    private String accessKey;
    @Value("${minio.password}")
    private String secretKey;

    @Bean
    public MinioUtils creatMinioClient() {
        return new MinioUtils(endpoint, bucketName, accessKey, secretKey);
    }

}